package com.example.myapplication.net.bean.request

import com.example.myapplication.extensions.json

class CheckChunkExistParams {

    val docName: String // 文件名
    val docSize: Long // 文件大小
    val blockSize: Int // 总大小
    val chunkSize: Int // 块大小
    val uploadId: String  // uploadId 文件上传id
    val hashCode: String // 块md5值
    val docChunkNumber: Int  // 总块数
    val index: Int// 块序号

    constructor(
        docName: String,
        docSize: Long,
        blockSize: Int,
        chunkSize: Int,
        uploadId: String,
        hashCode: String,
        docChunkNumber: Int,
        index: Int
    ) {
        this.docName = docName
        this.docSize = docSize
        this.blockSize = blockSize
        this.chunkSize = chunkSize
        this.uploadId = uploadId
        this.hashCode = hashCode
        this.docChunkNumber = docChunkNumber
        this.index = index
    }

    override fun toString(): String {
        return json().writeValueAsString(this)
    }

}